package com.apps.globals.global.service.impl;

import com.apps.globals.global.model.po.KupaGlobalFilterWords;
import com.apps.globals.global.dao.KupaGlobalFilterWordsMapper;
import com.apps.globals.global.service.IKupaGlobalFilterWordsService;
import com.apps.sworld.dao.impl.sDaoImpl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.Data;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 大鹏
 * @since 2020-11-21
 */
@Data
@Service
public class KupaGlobalFilterWordsServiceImpl extends sDaoImpl<KupaGlobalFilterWordsMapper, KupaGlobalFilterWords> implements IKupaGlobalFilterWordsService
{

    private List<String> worldLib=new ArrayList<>();

    @Override
    public void onLoad()
    {
        List<KupaGlobalFilterWords> filterWords=query();
        for(KupaGlobalFilterWords world:filterWords)
            worldLib.add(world.getWorld());
    }

    @Override
    public List<String> getWorlds() {
        return worldLib;
    }
}
